//
//  AboutusViewController.m
//  OfferJob
//
//  Created by 河南动力无限科技有限公司 on 17/7/20.
//  Copyright © 2017年 郑州动力无限科技. All rights reserved.
//

#import "AboutusViewController.h"
#import "SetupableViewCell.h"
#import "pingTaiViewController.h"
#import "yiJianViewController.h"
@interface AboutusViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic,strong)UITableView* tableView;
@end

@implementation AboutusViewController

- (void)viewDidLoad {
    self.title=@"关于我们";
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   
    
    _tableView=[[UITableView alloc]initWithFrame:CGRectMake(0,0, SCREEN_WIDTH, SCREEN_HEIGHT-49)];
    _tableView.delegate=self;
    _tableView.dataSource=self;
    _tableView.backgroundColor=backgroundcolor;
    [_tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    [_tableView registerClass:[SetupableViewCell class] forCellReuseIdentifier:@"SetupableViewCell"];
    [self.view addSubview:_tableView];
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    NSArray* iconArr=@[@"icon_ptxx",@"icon_ptxx-1"];
    NSArray* titleArr=@[@"平台信息",@"意见反馈"];
    SetupableViewCell *cell = (SetupableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"SetupableViewCell" forIndexPath:indexPath];
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    cell.backgroundColor=[UIColor whiteColor];
    cell.imagView.image=[UIImage imageNamed:iconArr[indexPath.row]];
    cell.titleLB.text=titleArr[indexPath.row];
    
    return cell;
    
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row==0) {
        pingTaiViewController* xiumima=[[pingTaiViewController alloc]init];
        [self .navigationController pushViewController:xiumima animated:YES];
        
    }else if (indexPath.row==1){
        
        yiJianViewController* xiumima=[[yiJianViewController alloc]init];
        [self .navigationController pushViewController:xiumima animated:YES];
      
}
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 44*kAppScale;
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
